let initialState = {
  listData: {
    list: [],
    pages: 0,
    total: 0,
  },
  listLoading: false,
};

const order = (state = initialState, action) => {
  switch (action.type) {
    case 'TOGGLE_LIST_LOADING':
      return { ...state, listLoading: action.payload };
    case 'GET_ORDER_LISTDATA_INFO':
      return { ...state, listData: action.payload };
    default:
      return state;
  }
};

export default order;
